#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
int main()
{
	int arr[10] = { 0 };
	int arr1[10] = { 0 };
	int i = 0;
	int k = 0;
	int flag = 1;
	for (i = 0; i < 10; i++)
	{
		scanf("%d", &arr[i]);
	}
	for (i = 0; i < 10; i++)
	{
		int j = 0;
		if (arr[i] == 1)
			continue;
		else
		for (j = 2,flag = 1; j < arr[i]; j++)
		{
			if (arr[i] % j == 0)
			{
				flag++;
			}
			else
				;
		}
		if (flag == 1)
		{
			arr1[k] = arr[i];
			k++;
		}
	}
	if (k == 0)
	{
		printf("%d", k);
	}
	else 
		printf("%d,", k );
	for (i = 0; i < k ; i++)
	{
		printf("%d ", arr1[i]);
	}
	return 0;
}